Skip to content

Change Data.construct(from uint8Array:) return type from Data? to Data#752

Merged
kateinoigakukun merged 1 commit into
mainfrom
yt/fix-data-ctor-return-ty
Jun 1, 2026
Merged

Change Data.construct(from uint8Array:) return type from Data? to Data#752
kateinoigakukun merged 1 commit into
mainfrom
yt/fix-data-ctor-return-ty

Conversation

@kateinoigakukun
Copy link
Copy Markdown
Member

Summary

  • change Data.construct(from uint8Array:) return type from Data? to Data
  • keep Data.construct(from jsValue:) optional, since converting from JSValue can fail

Rationale

Constructing from an already-typed JSTypedArray<UInt8> cannot fail, so the optional return type is unnecessary.

@kateinoigakukun kateinoigakukun marked this pull request as ready for review June 1, 2026 16:24
@kateinoigakukun kateinoigakukun changed the title Make Data typed-array constructor non-optional Change Data.construct(from uint8Array:) return type from Data? to Data Jun 1, 2026
@kateinoigakukun kateinoigakukun merged commit d1e0f95 into main Jun 1, 2026
13 checks passed
@kateinoigakukun kateinoigakukun deleted the yt/fix-data-ctor-return-ty branch June 1, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant